package bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 第3种方式，直接在类上使用
 */
@Component("student101")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@PropertySource("config.properties")
public class Student {

    private int id;

    private String name;
}
